<?php
/**
 * CreativeRecommendationProperties
 *
 * PHP version 5
 *
 * @category Class
 * @package  AmazonAdvertisingApi
 * @author   vv_guo
 * @link    https://gitee.com/HuaLiLiDeDiDiao/amazon-advertising-api
 */

/**
 * Sponsored Brands campaign management
 *
 * Create and manage Sponsored Brands campaigns.   To learn more about Sponsored Brands campaigns, see:   - [Sponsored Brands overview](guides/sponsored-brands/overview)  - [Sponsored Brands campaign structure](guides/sponsored-brands/campaigns/structure)  - [Get started with Sponsored Brands campaigns](guides/sponsored-brands/campaigns/get-started-with-campaigns)
 *
 * OpenAPI spec version: 4.0
 * 
 * Generated by:https://gitee.com/HuaLiLiDeDiDiao/amazon-advertising-api.git
 * AmazonAdvertisingApi Codegen version: 3.0.51
 */
/**
 * NOTE: This class is auto generated by the AmazonAdvertisingApi code generator program.
 *https://gitee.com/HuaLiLiDeDiDiao/amazon-advertising-api
 * Do not edit the class manually.
 */

namespace AmazonAdvertisingApi\Model;

use \ArrayAccess;
use \AmazonAdvertisingApi\ObjectSerializer;

/**
 * CreativeRecommendationProperties Class Doc Comment
 *
 * @category Class
 * @description Nested Creative Properties Structure for fetching Creative Recommendations.
 * @package  AmazonAdvertisingApi
 * @author   vv_guo
 * @link    https://gitee.com/HuaLiLiDeDiDiao/amazon-advertising-api
 */
class CreativeRecommendationProperties implements ModelInterface, ArrayAccess
{
    const DISCRIMINATOR = null;

    /**
      * The original name of the model.
      *
      * @var string
      */
    protected static $AmazonAdvertisingApiModelName = 'CreativeRecommendationProperties';

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $AmazonAdvertisingApiTypes = [
        'asins' => 'string[]',
        'brand_name' => 'string',
        'subpages' => '\AmazonAdvertisingApi\Model\Subpage[]',
        'landing_page' => '\AmazonAdvertisingApi\Model\CreativeLandingPageV2',
        'custom_images' => '\AmazonAdvertisingApi\Model\CustomImage[]',
        'video_asset_ids' => 'string[]',
        'recommended_creative_id' => 'string',
        'brand_logo' => '\AmazonAdvertisingApi\Model\BrandLogo',
        'headline' => 'string'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $AmazonAdvertisingApiFormats = [
        'asins' => null,
        'brand_name' => null,
        'subpages' => null,
        'landing_page' => null,
        'custom_images' => null,
        'video_asset_ids' => null,
        'recommended_creative_id' => null,
        'brand_logo' => null,
        'headline' => null
    ];

    /**
     * Array of property to type mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function AmazonAdvertisingApiTypes()
    {
        return self::$AmazonAdvertisingApiTypes;
    }

    /**
     * Array of property to format mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function AmazonAdvertisingApiFormats()
    {
        return self::$AmazonAdvertisingApiFormats;
    }

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @var string[]
     */
    protected static $attributeMap = [
        'asins' => 'asins',
        'brand_name' => 'brandName',
        'subpages' => 'subpages',
        'landing_page' => 'landingPage',
        'custom_images' => 'customImages',
        'video_asset_ids' => 'videoAssetIds',
        'recommended_creative_id' => 'recommendedCreativeId',
        'brand_logo' => 'brandLogo',
        'headline' => 'headline'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'asins' => 'setAsins',
        'brand_name' => 'setBrandName',
        'subpages' => 'setSubpages',
        'landing_page' => 'setLandingPage',
        'custom_images' => 'setCustomImages',
        'video_asset_ids' => 'setVideoAssetIds',
        'recommended_creative_id' => 'setRecommendedCreativeId',
        'brand_logo' => 'setBrandLogo',
        'headline' => 'setHeadline'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'asins' => 'getAsins',
        'brand_name' => 'getBrandName',
        'subpages' => 'getSubpages',
        'landing_page' => 'getLandingPage',
        'custom_images' => 'getCustomImages',
        'video_asset_ids' => 'getVideoAssetIds',
        'recommended_creative_id' => 'getRecommendedCreativeId',
        'brand_logo' => 'getBrandLogo',
        'headline' => 'getHeadline'
    ];

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @return array
     */
    public static function attributeMap()
    {
        return self::$attributeMap;
    }

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @return array
     */
    public static function setters()
    {
        return self::$setters;
    }

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @return array
     */
    public static function getters()
    {
        return self::$getters;
    }

    /**
     * The original name of the model.
     *
     * @return string
     */
    public function getModelName()
    {
        return self::$AmazonAdvertisingApiModelName;
    }



    /**
     * Associative array for storing property values
     *
     * @var mixed[]
     */
    protected $container = [];

    /**
     * Constructor
     *
     * @param mixed[] $data Associated array of property values
     *                      initializing the model
     */
    public function __construct(array $data = null)
    {
        $this->container['asins'] = isset($data['asins']) ? $data['asins'] : null;
        $this->container['brand_name'] = isset($data['brand_name']) ? $data['brand_name'] : null;
        $this->container['subpages'] = isset($data['subpages']) ? $data['subpages'] : null;
        $this->container['landing_page'] = isset($data['landing_page']) ? $data['landing_page'] : null;
        $this->container['custom_images'] = isset($data['custom_images']) ? $data['custom_images'] : null;
        $this->container['video_asset_ids'] = isset($data['video_asset_ids']) ? $data['video_asset_ids'] : null;
        $this->container['recommended_creative_id'] = isset($data['recommended_creative_id']) ? $data['recommended_creative_id'] : null;
        $this->container['brand_logo'] = isset($data['brand_logo']) ? $data['brand_logo'] : null;
        $this->container['headline'] = isset($data['headline']) ? $data['headline'] : null;
    }

    /**
     * Show all the invalid properties with reasons.
     *
     * @return array invalid properties with reasons
     */
    public function listInvalidProperties()
    {
        $invalidProperties = [];

        return $invalidProperties;
    }

    /**
     * Validate all the properties in the model
     * return true if all passed
     *
     * @return bool True if all properties are valid
     */
    public function valid()
    {
        return count($this->listInvalidProperties()) === 0;
    }


    /**
     * Gets asins
     *
     * @return string[]
     */
    public function getAsins()
    {
        return $this->container['asins'];
    }

    /**
     * Sets asins
     *
     * @param string[] $asins ----------------------------------------------- List types ----------------------------------------------- A list of ASINs
     *
     * @return $this
     */
    public function setAsins($asins)
    {
        $this->container['asins'] = $asins;

        return $this;
    }

    /**
     * Gets brand_name
     *
     * @return string
     */
    public function getBrandName()
    {
        return $this->container['brand_name'];
    }

    /**
     * Sets brand_name
     *
     * @param string $brand_name The displayed brand name in the ad headline. Maximum length is 30 characters. See [the policy](https://advertising.amazon.com/resources/ad-policy/sponsored-ads-policies#headlines) for headline requirements.
     *
     * @return $this
     */
    public function setBrandName($brand_name)
    {
        $this->container['brand_name'] = $brand_name;

        return $this;
    }

    /**
     * Gets subpages
     *
     * @return \AmazonAdvertisingApi\Model\Subpage[]
     */
    public function getSubpages()
    {
        return $this->container['subpages'];
    }

    /**
     * Sets subpages
     *
     * @param \AmazonAdvertisingApi\Model\Subpage[] $subpages An array of subpages
     *
     * @return $this
     */
    public function setSubpages($subpages)
    {
        $this->container['subpages'] = $subpages;

        return $this;
    }

    /**
     * Gets landing_page
     *
     * @return \AmazonAdvertisingApi\Model\CreativeLandingPageV2
     */
    public function getLandingPage()
    {
        return $this->container['landing_page'];
    }

    /**
     * Sets landing_page
     *
     * @param \AmazonAdvertisingApi\Model\CreativeLandingPageV2 $landing_page landing_page
     *
     * @return $this
     */
    public function setLandingPage($landing_page)
    {
        $this->container['landing_page'] = $landing_page;

        return $this;
    }

    /**
     * Gets custom_images
     *
     * @return \AmazonAdvertisingApi\Model\CustomImage[]
     */
    public function getCustomImages()
    {
        return $this->container['custom_images'];
    }

    /**
     * Sets custom_images
     *
     * @param \AmazonAdvertisingApi\Model\CustomImage[] $custom_images An array of customImages associated with the creative.
     *
     * @return $this
     */
    public function setCustomImages($custom_images)
    {
        $this->container['custom_images'] = $custom_images;

        return $this;
    }

    /**
     * Gets video_asset_ids
     *
     * @return string[]
     */
    public function getVideoAssetIds()
    {
        return $this->container['video_asset_ids'];
    }

    /**
     * Sets video_asset_ids
     *
     * @param string[] $video_asset_ids An array of videoAssetIds associated with the creative. Advertisers can get video assetIds from Asset Library /assets/search API.
     *
     * @return $this
     */
    public function setVideoAssetIds($video_asset_ids)
    {
        $this->container['video_asset_ids'] = $video_asset_ids;

        return $this;
    }

    /**
     * Gets recommended_creative_id
     *
     * @return string
     */
    public function getRecommendedCreativeId()
    {
        return $this->container['recommended_creative_id'];
    }

    /**
     * Sets recommended_creative_id
     *
     * @param string $recommended_creative_id a Unique Id identifying the creative Recommendation
     *
     * @return $this
     */
    public function setRecommendedCreativeId($recommended_creative_id)
    {
        $this->container['recommended_creative_id'] = $recommended_creative_id;

        return $this;
    }

    /**
     * Gets brand_logo
     *
     * @return \AmazonAdvertisingApi\Model\BrandLogo
     */
    public function getBrandLogo()
    {
        return $this->container['brand_logo'];
    }

    /**
     * Sets brand_logo
     *
     * @param \AmazonAdvertisingApi\Model\BrandLogo $brand_logo brand_logo
     *
     * @return $this
     */
    public function setBrandLogo($brand_logo)
    {
        $this->container['brand_logo'] = $brand_logo;

        return $this;
    }

    /**
     * Gets headline
     *
     * @return string
     */
    public function getHeadline()
    {
        return $this->container['headline'];
    }

    /**
     * Sets headline
     *
     * @param string $headline The headline text. Maximum length of the string is 50 characters for all marketplaces other than Japan, which has a maximum length of 35 characters. See [the policy](https://advertising.amazon.com/resources/ad-policy/sponsored-ads-policies#headlines) for headline requirements.
     *
     * @return $this
     */
    public function setHeadline($headline)
    {
        $this->container['headline'] = $headline;

        return $this;
    }
    /**
     * Returns true if offset exists. False otherwise.
     *
     * @param integer $offset Offset
     *
     * @return boolean
     */
    #[\ReturnTypeWillChange]
    public function offsetExists($offset)
    {
        return isset($this->container[$offset]);
    }

    /**
     * Gets offset.
     *
     * @param integer $offset Offset
     *
     * @return mixed
     */
    #[\ReturnTypeWillChange]
    public function offsetGet($offset)
    {
        return isset($this->container[$offset]) ? $this->container[$offset] : null;
    }

    /**
     * Sets value based on offset.
     *
     * @param integer $offset Offset
     * @param mixed   $value  Value to be set
     *
     * @return void
     */
    #[\ReturnTypeWillChange]
    public function offsetSet($offset, $value)
    {
        if (is_null($offset)) {
            $this->container[] = $value;
        } else {
            $this->container[$offset] = $value;
        }
    }

    /**
     * Unsets offset.
     *
     * @param integer $offset Offset
     *
     * @return void
     */
    #[\ReturnTypeWillChange]
    public function offsetUnset($offset)
    {
        unset($this->container[$offset]);
    }

    /**
     * Gets the string presentation of the object
     *
     * @return string
     */
    public function __toString()
    {
        if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
            return json_encode(
                ObjectSerializer::sanitizeForSerialization($this),
                JSON_PRETTY_PRINT
            );
        }

        return json_encode(ObjectSerializer::sanitizeForSerialization($this));
    }
}
